package com.nbcb.nwql.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

public class CommonUtil1 {
    /**
     * 年月日  20230318
     */
    public final static SimpleDateFormat sdf8 = new SimpleDateFormat("yyyyMMdd");
    /**
     * 年月日  2023-03-18
     */
    public final static SimpleDateFormat sdf8_g = new SimpleDateFormat("yyyy-MM-dd");
    /**
     * 年月日  2023_03_18
     */
    public final static SimpleDateFormat sdf_8 = new SimpleDateFormat("yyyy_MM_dd");
    /**
     * 年月日  20230318 153950
     */
    public final static SimpleDateFormat sdf1214 = new SimpleDateFormat("yyyyMMdd hhmmss");
    /**
     * 年月日  20230318 153950
     */
    public final static SimpleDateFormat sdf2414 = new SimpleDateFormat("yyyyMMdd HHMMss");
    /**
     * 年月日  2023-03-18 15:39:50
     */
    public final static SimpleDateFormat sdf14_g = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    /**
     * 年月日  2023_03_18 15:39:50
     */
    public final static SimpleDateFormat sdf_14 = new SimpleDateFormat("yyyy_MM_dd hh:mm:ss");

    //redis  key必带的数据
    public final static String redisKeySuff = "redis_";
    //xmemcached  key必带的数据
    public final static String xmemcachedKeySuff = "xmem_";

    //xmemcached  统一返回
    public final static String success = "success";

    //xmemcached  统一返回
    public final static String fail = "erro";
    public static String generateUUID(){
        String uuids = UUID.randomUUID().toString();
        return sdf2414.format(new Date()) + uuids.substring(14);
    }
}
